package com.css.listener;

import com.css.entity.NeedUploadMap;

/**
 * <p>
 * -
 * </p>
 *
 * @author css
 * @since 2021/4/7
 */
public class MouseListener{
    private Mouse mouse;

    public MouseListener() {
        mouse = new Mouse();
    }

    public void start() {
        mouse.setMouseListener(new com.css.listener.interfaces.MouseListener() {
            @Override
            public void move() {

            }

            @Override
            public void leftDown() {

            }

            @Override
            public void leftUp() {
                NeedUploadMap.addNum("鼠标左键");
            }

            @Override
            public void roller() {

            }

            @Override
            public void rightDown() {

            }

            @Override
            public void rightUp() {
                NeedUploadMap.addNum("鼠标右键");
            }
        });
    }

    public void stop() {
        mouse.setMouseListener(null);

    }
}
